#pragma once
#include <list>
#include "TCharSupport.h"
#include "EpilCodeBase.h"
#include "EpilChunkCode.h"
#include "EpilExpressionCodeBase.h"

using namespace std;


class EpilThenBlockCode : public EpilCodeBase
{
	EPIL_CODE_DECL( ThenBlock );

public:
	EpilThenBlockCode( const EpilLexLocation & location );
	virtual ~EpilThenBlockCode();

	EpilExpressionCodeBase *			GetCondition() const									{ return m_condition; }
	void								SetCondition( EpilExpressionCodeBase * condition )		{ m_condition = condition; }
	EpilChunkCode *						GetChunk() const										{ return m_chunk; }
	void								SetChunk( EpilChunkCode * chunk )						{ m_chunk = chunk; }

	virtual tstring						ToEpilCode( int indent = 0 ) const;

private:
	EpilExpressionCodeBase *			m_condition;
	EpilChunkCode *						m_chunk;
};


typedef list<EpilThenBlockCode*>		EpilThenBlockCodeList;